package com.liaoban.app.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.liaoban.app.R;
import com.liaoban.app.api.type.Notice;
import com.liaoban.app.util.DateTimeUtils;

import java.util.List;

/**
 * Created by ybc on 2018/7/27 0027.
 * 通知
 */
public class NoticeAdapter extends BaseQuickAdapter<Notice, BaseViewHolder> {

    public NoticeAdapter(@Nullable List<Notice> data) {
        super(R.layout.item_notice, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Notice item) {
        helper.setText(R.id.tv_time, DateTimeUtils.formatData(item.getTime() * 1000L));
        helper.setText(R.id.tv_title, item.getTitle());
        helper.setText(R.id.tv_time1, DateTimeUtils.formatData(item.getTime() * 1000L));
        helper.setText(R.id.tv_detail, item.getDetail());
    }
}
